<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: src/IODevice.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">IODevice.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_i_o_device_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of libemb.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libemb is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * libemb is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * along with libemb.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * Project: Embedme</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * Author : FergusZeng</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * Email  : cblock@126.com</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * git    : https://gitee.com/newgolo/embedme.git</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * Copyright 2014~2020 @ ShenZhen ,China</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">*******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __IODEVICE_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __IODEVICE_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_base_type_8h.html">BaseType.h</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">namespace </span>libemb{</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438">   36</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438">IO_MODE_E</a></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;{</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a3d257633efac73a1b61a47273fedbdb1">   38</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a3d257633efac73a1b61a47273fedbdb1">IO_MODE_RD_ONLY</a>=0,      </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a086eedf4de319baece28cd50aaf5f27b">   39</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a086eedf4de319baece28cd50aaf5f27b">IO_MODE_WR_ONLY</a>,        </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438adfdb9a5b5560a6535f659200e9a1eed0">   40</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438adfdb9a5b5560a6535f659200e9a1eed0">IO_MODE_RDWR_ONLY</a>,      </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438ad9af52ee9a1d21ec32c91cb53e4c545b">   41</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438ad9af52ee9a1d21ec32c91cb53e4c545b">IO_MODE_APPEND_ONLY</a>,    </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a224250898f62a465847fb6648d5ad432">   42</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a224250898f62a465847fb6648d5ad432">IO_MODE_REWR_ORNEW</a>,     </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a83de3d07734fdb19a1ff74a4d8f1ccc8">   43</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a83de3d07734fdb19a1ff74a4d8f1ccc8">IO_MODE_RDWR_ORNEW</a>,     </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a97a20a9fd56ad0188b6726fd0c20390e">   44</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a97a20a9fd56ad0188b6726fd0c20390e">IO_MODE_APPEND_ORNEW</a>,   </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a0156c46e7a0791fc900f4bea9acef347">   45</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a0156c46e7a0791fc900f4bea9acef347">IO_MODE_RDAPPEND_ORNEW</a>, </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a9ff722bf0e6fc2f1edf0a7b2d4580688">   46</a></span>&#160;    <a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a9ff722bf0e6fc2f1edf0a7b2d4580688">IO_MODE_INVALID</a>=0xFF,   </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;};</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classlibemb_1_1_i_o_device.html">   53</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_i_o_device.html">IODevice</a>{</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_i_o_device.html">IODevice</a>)</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="classlibemb_1_1_i_o_device.html">IODevice</a>();</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_i_o_device.html">IODevice</a>();</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_i_o_device.html#a41072f54003d47e1e1517958605b1e46">open</a>(<span class="keyword">const</span> std::string&amp; devName,<span class="keywordtype">int</span> ioMode=<a class="code" href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a9ff722bf0e6fc2f1edf0a7b2d4580688">IO_MODE_INVALID</a>);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_i_o_device.html#a14794dab8323c4850c9512b3a7d41335">close</a>();</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#ae72ace3efe7f7fffbea691cab647850b">readData</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#a9cde5b2c2a0d1157bc818148ecafbe32">writeData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#ae3510f12e4bc5bcea11f2328534feebc">recvData</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#a2d917acb7ad2f18e1fe8cecba124de2d">sendData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#abe8326c262b8eb210d41f8cd1f00102b">setAttribute</a>(<span class="keywordtype">int</span> attr, <span class="keywordtype">int</span> value);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#a8e73b2bd9241b8958cc216157ed7bfef">getAttribute</a>(<span class="keywordtype">int</span> attr);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_i_o_device.html#a81457fca59662cf3844ee79dff9b825e">fd</a>();</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_i_o_device.html#aa91aa91ca082dcd90b3c21b5fdcbe2c6">isOpen</a>();</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordtype">int</span> m_fd{-1};</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordtype">int</span> m_openMode{-1};</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    std::string m_devName{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;};</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;}</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html">libemb::IODevice</a></div><div class="ttdoc">IO设备抽象类</div><div class="ttdef"><b>Definition:</b> IODevice.h:53</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_a8e73b2bd9241b8958cc216157ed7bfef"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#a8e73b2bd9241b8958cc216157ed7bfef">libemb::IODevice::getAttribute</a></div><div class="ttdeci">virtual int getAttribute(int attr)</div><div class="ttdoc">获取属性值</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:185</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_a2d917acb7ad2f18e1fe8cecba124de2d"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#a2d917acb7ad2f18e1fe8cecba124de2d">libemb::IODevice::sendData</a></div><div class="ttdeci">virtual int sendData(const char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">发送数据</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:175</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a83de3d07734fdb19a1ff74a4d8f1ccc8"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a83de3d07734fdb19a1ff74a4d8f1ccc8">libemb::IO_MODE_RDWR_ORNEW</a></div><div class="ttdeci">@ IO_MODE_RDWR_ORNEW</div><div class="ttdef"><b>Definition:</b> IODevice.h:43</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438ad9af52ee9a1d21ec32c91cb53e4c545b"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438ad9af52ee9a1d21ec32c91cb53e4c545b">libemb::IO_MODE_APPEND_ONLY</a></div><div class="ttdeci">@ IO_MODE_APPEND_ONLY</div><div class="ttdef"><b>Definition:</b> IODevice.h:41</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_a41072f54003d47e1e1517958605b1e46"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#a41072f54003d47e1e1517958605b1e46">libemb::IODevice::open</a></div><div class="ttdeci">virtual bool open(const std::string &amp;devName, int ioMode=IO_MODE_INVALID)</div><div class="ttdoc">打开设备</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:62</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438">libemb::IO_MODE_E</a></div><div class="ttdeci">IO_MODE_E</div><div class="ttdef"><b>Definition:</b> IODevice.h:37</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_a9cde5b2c2a0d1157bc818148ecafbe32"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#a9cde5b2c2a0d1157bc818148ecafbe32">libemb::IODevice::writeData</a></div><div class="ttdeci">virtual int writeData(const char *buf, int len)</div><div class="ttdoc">写入数据</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:143</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a0156c46e7a0791fc900f4bea9acef347"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a0156c46e7a0791fc900f4bea9acef347">libemb::IO_MODE_RDAPPEND_ORNEW</a></div><div class="ttdeci">@ IO_MODE_RDAPPEND_ORNEW</div><div class="ttdef"><b>Definition:</b> IODevice.h:45</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a97a20a9fd56ad0188b6726fd0c20390e"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a97a20a9fd56ad0188b6726fd0c20390e">libemb::IO_MODE_APPEND_ORNEW</a></div><div class="ttdeci">@ IO_MODE_APPEND_ORNEW</div><div class="ttdef"><b>Definition:</b> IODevice.h:44</div></div>
<div class="ttc" id="a_base_type_8h_html"><div class="ttname"><a href="_base_type_8h.html">BaseType.h</a></div><div class="ttdoc">基础类型头文件</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a086eedf4de319baece28cd50aaf5f27b"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a086eedf4de319baece28cd50aaf5f27b">libemb::IO_MODE_WR_ONLY</a></div><div class="ttdeci">@ IO_MODE_WR_ONLY</div><div class="ttdef"><b>Definition:</b> IODevice.h:39</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438adfdb9a5b5560a6535f659200e9a1eed0"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438adfdb9a5b5560a6535f659200e9a1eed0">libemb::IO_MODE_RDWR_ONLY</a></div><div class="ttdeci">@ IO_MODE_RDWR_ONLY</div><div class="ttdef"><b>Definition:</b> IODevice.h:40</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_a81457fca59662cf3844ee79dff9b825e"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#a81457fca59662cf3844ee79dff9b825e">libemb::IODevice::fd</a></div><div class="ttdeci">virtual int fd()</div><div class="ttdoc">获取设备描述符</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:190</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_ae3510f12e4bc5bcea11f2328534feebc"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#ae3510f12e4bc5bcea11f2328534feebc">libemb::IODevice::recvData</a></div><div class="ttdeci">virtual int recvData(char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">接收数据</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:170</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_a14794dab8323c4850c9512b3a7d41335"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#a14794dab8323c4850c9512b3a7d41335">libemb::IODevice::close</a></div><div class="ttdeci">virtual bool close()</div><div class="ttdoc">关闭设备</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:107</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a9ff722bf0e6fc2f1edf0a7b2d4580688"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a9ff722bf0e6fc2f1edf0a7b2d4580688">libemb::IO_MODE_INVALID</a></div><div class="ttdeci">@ IO_MODE_INVALID</div><div class="ttdef"><b>Definition:</b> IODevice.h:46</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_abe8326c262b8eb210d41f8cd1f00102b"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#abe8326c262b8eb210d41f8cd1f00102b">libemb::IODevice::setAttribute</a></div><div class="ttdeci">virtual int setAttribute(int attr, int value)</div><div class="ttdoc">设置属性</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:180</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a224250898f62a465847fb6648d5ad432"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a224250898f62a465847fb6648d5ad432">libemb::IO_MODE_REWR_ORNEW</a></div><div class="ttdeci">@ IO_MODE_REWR_ORNEW</div><div class="ttdef"><b>Definition:</b> IODevice.h:42</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_ae72ace3efe7f7fffbea691cab647850b"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#ae72ace3efe7f7fffbea691cab647850b">libemb::IODevice::readData</a></div><div class="ttdeci">virtual int readData(char *buf, int len)</div><div class="ttdoc">读数据</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:117</div></div>
<div class="ttc" id="a_i_o_device_8h_html_aebc0013d0befa27f40e0592cdf697438a3d257633efac73a1b61a47273fedbdb1"><div class="ttname"><a href="_i_o_device_8h.html#aebc0013d0befa27f40e0592cdf697438a3d257633efac73a1b61a47273fedbdb1">libemb::IO_MODE_RD_ONLY</a></div><div class="ttdeci">@ IO_MODE_RD_ONLY</div><div class="ttdef"><b>Definition:</b> IODevice.h:38</div></div>
<div class="ttc" id="a_base_type_8h_html_a57e803e49526dc5ba8c1915c68708ae0"><div class="ttname"><a href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a></div><div class="ttdeci">#define DECL_CLASSNAME(ClassName)</div><div class="ttdef"><b>Definition:</b> BaseType.h:176</div></div>
<div class="ttc" id="aclasslibemb_1_1_i_o_device_html_aa91aa91ca082dcd90b3c21b5fdcbe2c6"><div class="ttname"><a href="classlibemb_1_1_i_o_device.html#aa91aa91ca082dcd90b3c21b5fdcbe2c6">libemb::IODevice::isOpen</a></div><div class="ttdeci">virtual bool isOpen()</div><div class="ttdoc">判断设备是否打开</div><div class="ttdef"><b>Definition:</b> IODevice.cpp:195</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
